package com.ssc.ssc.dao;

import com.ssc.ssc.pojo.User;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserMapper {
	
	/**
	 * 通过username查询User
	 *
	 * @param username
	 *
	 * @return
	 */
	User selectByUserName(@Param(value = "username") String username) throws Exception;
	
	/**
	 * 通过id查询他Admin
	 */
	User selectById(@Param(value = "id") int id) throws Exception;
	
	/**
	 * 查询所有User
	 */
	List<User> selectAll() throws Exception;
	
	/**
	 * 添加User
	 */
	int insert(User user) throws Exception;
	
	/**
	 * 修改User
	 */
	int update(User user) throws Exception;
	
	/**
	 * 通过id删除
	 */
	int deleteById(@Param(value = "id") int id, @Param(value = "status") int status) throws Exception;
}